﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Agr.CQRS.Domain;
using Agr.CQRS.Domain.Repository;

namespace Tests.Agr.CQRS
{
    class MockDomainRepository : IDomainRepository
    {

        public AggregateRoot GetById(Guid id, int version, Type aggregateRootType)
        {
            throw new NotImplementedException();
        }

        public T GetById<T>(Guid id, int version) where T : AggregateRoot
        {
            return Activator.CreateInstance<T>();
        }

        public AggregateRoot LastSaved { get; set; }

        public void SaveChanges(AggregateRoot ar)
        {
            LastSaved = ar;
        }

    }
}
